<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive"/>
    </keep-alive>

    <router-view v-if="!$route.meta.keepAlive"/>
  </div>
</template>

<script>
  export default {
    name: 'App',
    data() {
      return {}
    }
  }
</script>

<style lang="scss">
  @import './css/reset.css';
  @import './css/struc.scss';
  @import './css/vant_init.scss';

  html, body {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    user-select: none;
    touch-action: manipulation; // 禁止双击行为, 避免 click 事件 300ms 延迟
    z-index: 1;
  }

  #app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateZ(0); /*强制开启GPU加速渲染*/
    font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
    color: #333;
  }

  .clearfix::after {
    display: block;
    content: '';
    clear: both;
  }
</style>
